package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author ${xinpl}
 * @date 2020/4/13-11:25
 */
public interface UserService {

    /**
     * 根据用户名查询用户对象信息
     * @param username
     * @return
     */
    User findUserByUsername(String username);

    PageResult findPage(QueryPageBean queryPageBean);

    void add(User user, Integer[] roleIds);

    List<Role> findAll();

    User findById(int id);

    List<Integer> findRoleByUserId(int id);

    void update(User user, Integer[] roleIds);

    void delete(int id);

    //获取用户菜单
    LinkedHashSet<Map<String, Object>> getMenuByUsername(String username);

    void EditPassword(Integer pid, String pass);
}
